package com.wkbb.sports.mapper;

import com.wkbb.common.base.BaseMapper;
import com.wkbb.sports.dto.*;
import com.wkbb.sports.model.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface HlifeTrainMapper extends BaseMapper<HlifeTrain> {

	List<Long> queryTrainIdList(Map<String, Object> params)throws Exception;
	
	List<TrainTimeDto> queryTrainTimeList(@Param("ids") String ids)throws Exception;

	List<HlifeTrain> getTrainForMessageList(Map<String, Object> params)throws Exception;

	List<HlifeTrain> getAchievementClassList(Map<String, Object> params)throws Exception;
	
	List<HlifeTrain> getTrainList(Map<String,Object> params)throws Exception;
	
	List<ProjectAverageDto> getProjectAverage(@Param("ids") String ids)throws Exception;

	TrainAnalysisDto getTeacherTrainStat(Map<String, Object> params);

	HlifeTrain getTeacherLastTrain(Map<String, Object> params);
	
	HlifeTrain getTrain(Map<String, Object> params);

	//设备授权
	int insertDeviceAuthorization(HlifeDeviceAuthorization data);
	int insertDeviceAuthorizationList(List<HlifeDeviceAuthorization> list);
	int insertDeviceAuthorizationLog(HlifeDeviceAuthorizationLog data);
    List<HlifeDeviceAuthorizationLog> queryDeviceAuthorizationLogList(Byte projectKind);
    List<HlifeDeviceAuthorizationLog> getDeviceAuthorizationCount();
	HlifeDeviceAuthorization queryDeviceAuthorization(@Param("mac") String mac);
    //平板授权
	HlifePadAuthorizationLog getPadAuthorization(String padId);
	HlifePadAuthorizationLog getPadAuthorizationLog(HlifePadAuthorizationLog data);
	List<HlifePadAuthorizationLog> getPadAuthorizationLogList(@Param("padId") String padId);
	int insertPadAuthorizationLog(HlifePadAuthorizationLog data);
	int updatePadAuthorizationLog(HlifePadAuthorizationLog data);
	int insertPadAuthorization(Long id);

    PhysicalAnalysisDto getTeacherPhysicalAnalysis(Map<String, Object> params);

	TrainDto getStudentLastTrain(Map<String, Object> params);

    void insertGroupBatch(List<HlifeTrainGroup> groups);
	List<HlifeTrainGroup> queryTrainGroupList(Long trainId);

    List<LatelStuSportDto> getLatelyStuSport(Map<String, Object> params);

    List<TrainStuDto> getTrainListByStudent(Map<String, Object> params);
	TrainStuDto getTrainStudent(Map<String, Object> params);
}